package com.zhuo.project.order.service;

import java.util.List;
import java.util.Map;

import com.zhuo.project.order.domain.ZzDiagnoseDetail;

/**
 * 处方单明细Service接口
 * 
 * @author zhuo
 * @date 2020-03-26
 */
public interface IZzDiagnoseDetailService 
{
    /**
     * 查询处方单明细
     * 
     * @param id 处方单明细ID
     * @return 处方单明细
     */
    public ZzDiagnoseDetail selectZzDiagnoseDetailById(Long id);

    public List<ZzDiagnoseDetail> selectZzDiagnoseDetailByDiagnoseId(String diagnoseId);

    /**
     * 查询处方单明细列表
     * 
     * @param zzDiagnoseDetail 处方单明细
     * @return 处方单明细集合
     */
    public List<ZzDiagnoseDetail> selectZzDiagnoseDetailList(ZzDiagnoseDetail zzDiagnoseDetail);

    /**
     *
     * @param diagnoseId
     * @param materialId
     * @return
     */
    public List<ZzDiagnoseDetail> selectZzDiagnoseDetailListByOrderMaterialId(String diagnoseId,String materialId);

    /**
     * 获取剩余可配数量
     * @param diagnoseId
     * @return
     */
    public Map<String,Double> getDiagnoseLeftQty(String diagnoseId);

    /**
     *
     * @param diagnoseId
     * @return
     */
    public Double getDiagnoseMaterialIdLeftQty(String diagnoseId,String materialId);

    /**
     * 新增处方单明细
     * 
     * @param zzDiagnoseDetail 处方单明细
     * @return 结果
     */
    public int insertZzDiagnoseDetail(ZzDiagnoseDetail zzDiagnoseDetail);

    /**
     * 修改处方单明细
     * 
     * @param zzDiagnoseDetail 处方单明细
     * @return 结果
     */
    public int updateZzDiagnoseDetail(ZzDiagnoseDetail zzDiagnoseDetail);

    /**
     * 批量删除处方单明细
     * 
     * @param ids 需要删除的处方单明细ID
     * @return 结果
     */
    public int deleteZzDiagnoseDetailByIds(Long[] ids);

    /**
     * 删除处方单明细信息
     * 
     * @param id 处方单明细ID
     * @return 结果
     */
    public int deleteZzDiagnoseDetailById(Long id);
}
